package com.yima.baseproj.module.sys.role;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yima.baseproj.module.sys.role.model.RoleAddOrEditModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author 一码
 */
@Mapper
public interface SysRoleMapper extends BaseMapper<SysRoleEntity> {

    SysRoleEntity selectExistByName(String name);

    Page<Map> findBySearchVo(@Param("page")Page page, @Param("searchVo") RoleAddOrEditModel searchVo);

    List<Map> findBySearchVo(@Param("searchVo") RoleAddOrEditModel role);

    SysRoleEntity findByName(@Param("name")String name);

    List<SysRoleEntity> selectByUserId(@Param("userId")String userId);
}
